import 'package:flutter/material.dart';
import 'package:flutter/src/foundation/key.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/widgets.dart';

class RaisedButtonDemo extends StatefulWidget {
  const RaisedButtonDemo({Key? key}) : super(key: key);

  @override
  State<RaisedButtonDemo> createState() => _RaisedButtonDemoState();
}

class _RaisedButtonDemoState extends State<RaisedButtonDemo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title:const Text("RaisedButton凸起按钮") ,
        centerTitle: true,
      ),
      body: Column(
        children: [
          Text("RaisedButton是一个material风格”凸起“的按钮，基本用法："),
          RaisedButton(
            onPressed: (() {}),
            child: Text('Button'),
            onHighlightChanged: (high){}, //为高亮变化回调，按下时处于高亮状态，抬起处于不高亮状态，用法如下：
            textColor: Colors.red,  // 字体颜色
            disabledColor: Colors.black54,//禁用状态下字体颜色
            color: Colors.amberAccent, // 背景颜色
            splashColor: Colors.black26, // 水波纹颜色，按下松开会有水波效果
            textTheme: ButtonTextTheme.primary, //也可以通过textTheme设置字体样式，用法如下：
            shape: CircleBorder(),  // 设置按钮状态

            
            
            )
        ],
      ),
    );
    
  }
}